/**
 * 
 */
package de.uni_leipzig.informatik.asv.unsupervised_pos_tagger.tests;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
import de.uni_leipzig.informatik.asv.unsupervised_pos_tagger.datacreation.feature_types.HyphenFeatures;
/**
 * 
 * @author Christoph Teichmann
 * created Jun 7, 2014 9:11:46 PM
 * @version 0.1
 */
public class TestHyphenFeature
{
	/**
	 * 
	 */
	private HyphenFeatures hf;
	/**
	 *
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception
	{hf = new HyphenFeatures();}
	/**
	 * Test method for {@link de.uni_leipzig.informatik.asv.unsupervised_pos_tagger.datacreation.feature_types.HyphenFeatures#process(java.lang.String)}.
	 */
	@Test
	public final void testProcess()
	{
		assertEquals(hf.process("----"),"-");
		assertEquals(hf.process("-"),"-");
		assertEquals(hf.process("---asf----asdfe"),"-asf-asdfe");
	}
	/**
	 * Test method for {@link de.uni_leipzig.informatik.asv.unsupervised_pos_tagger.datacreation.feature_types.HyphenFeatures#name()}.
	 */
	@Test
	public final void testName()
	{assertEquals(hf.name(),"HYPHENFEATURE");}
	/**
	 * Test method for {@link de.uni_leipzig.informatik.asv.unsupervised_pos_tagger.datacreation.feature_types.GenericFeatureGenerator#getFeatName(java.lang.String)}.
	 */
	@Test
	public final void testGetFeatName()
	{
		assertEquals(hf.getFeatName("----"),"ALLHYPHEN");
		assertEquals(hf.getFeatName("----asda"),"STARTHYPHEN");
		assertEquals(hf.getFeatName("asda-"),"ENDHYPHEN");
		assertEquals(hf.getFeatName("asda"),"NOHYPHEN");
		assertEquals(hf.getFeatName("---asda---"),"MIXEDHYPHEN");
	}
	/**
	 * Test method for {@link de.uni_leipzig.informatik.asv.unsupervised_pos_tagger.datacreation.feature_types.GenericFeatureGenerator#getFeatureOptions()}.
	 */
	@Test
	public final void testGetFeatureOptions()
	{assertEquals(hf.getFeatureOptions().toString(),"[NOHYPHEN, MIXEDHYPHEN, ALLHYPHEN, STARTHYPHEN, ENDHYPHEN]");}
}